package com.kinyx.framework.processor;

import javax.lang.model.element.Element;

/**
 * Element封装类
 */
public class ElementWrapper {

	/** 上下文环境 */
	protected final Context context;
	public Context getContext() { return this.context; }
	/** 元素对象 */
	protected final Element element;
	public Element getElement() { return this.element; }

	/**
	 * 构造方法
	 * @param context 上下文环境
	 * @param element 元素对象
	 */
	public ElementWrapper(final Context context, final Element element) {
		super();
		this.context = context;
		this.element = element;
	}

	/** @return 包名 */
	public String getPackageName() { return this.context.getProcessingEnvironment().getElementUtils().getPackageOf(this.element).getQualifiedName().toString(); }

	/** @return 类简名 */
	public String getSimpleName() { return this.element.getSimpleName().toString(); }

	/** @return 类全名 */
	public String getFullName() { return this.getPackageName() + "." + this.getSimpleName(); }

}
